#include "DequeThread.h"

DequeThread::DequeThread()
{
    std::thread([this](){
        while(getSystemStatus()){
            if(allowRun.load()){
                while (!_p_furts.empty()) {
                    _p_furts.front().get();
                    _p_furts.pop_front();
                }
            }
            sleep_s(2);
        }

    }).detach();
    exec();
}

void DequeThread::pushThread(VoF t)
{
    // _p_furts.push_back(t);
}

void DequeThread::exec()
{
    allowRun = true;
}
